Skip to content

Conversation

@LJS42
Copy link
Contributor

@LJS42 LJS42 commented Nov 26, 2025

1.Extend the Polytope LMOs from FW to Boscia: KNormBallLMO, DiamondLMO (generalisation of the L1-norm ball), KSparseLMO
2.For the DiamondLMO, the L1 norm version is the only implemented,a diamond constraint can be inputed, but the result will most likely be incorrect because it implements L1 norm. haven't figured out how to implement a diamond constraint yet.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 85.84071% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.70%. Comparing base (ee5cc6c) to head (5c64725).
⚠️ Report is 111 commits behind head on main.

Files with missing lines Patch % Lines
src/polytope_blmos.jl 85.84% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
- Coverage   86.23%   84.70%   -1.53%     
==========================================
  Files          17       22       +5     
  Lines        1482     2753    +1271     
==========================================
+ Hits         1278     2332    +1054     
- Misses        204      421     +217     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LJS42
Copy link
Contributor Author

LJS42 commented Dec 3, 2025

There is only DiamondLMO(L1) and KsparseLMO

@LJS42 LJS42 changed the title Extand BLMO KNormBallLMO Dec 17, 2025
@LJS42 LJS42 changed the title KNormBallLMO KSparseBallLMO Dec 17, 2025
@LJS42
Copy link
Contributor Author

LJS42 commented Dec 17, 2025

Now is only Ksparse

Comment on lines 731 to 734
struct KSparseBLMO <: FrankWolfe.LinearMinimizationOracle
K::Int
right_hand_side::Float64
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

Comment on lines 736 to 744
function bounded_compute_extreme_point(
lmo::KSparseBLMO,
direction,
lb,
ub,
int_vars;
v=nothing,
kwargs...,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function bounded_compute_extreme_point(
lmo::FrankWolfe.KSparseLMO{T},
direction,
lb,
ub,
int_vars;
v=nothing,
kwargs...
)
..
end


for i in 1:n_int
v = clamp(τ, lb[i], ub[i])
if abs.(v) .> τ + tol
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the broadcasting is not needed here since v is a scalar.

Comment on lines 222 to 226

n = 20
sparsity = 0.3
x_sol = [rand() < sparsity ? 0 : rand(1:floor(Int, n / 4)) for _ in 1:n]
n_int = 17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove not needed.

Comment on lines 719 to 730

"""
KSparseLMO{T}(K::Int, right_hand_side::T)
LMO for the K-sparse polytope:
```
C = B_1(τK) ∩ B_∞(τ)
```
with `τ` the `right_hand_side` parameter.
The LMO results in a vector with the K largest absolute values
of direction, taking values `-τ sign(x_i)`.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a description/sketch the idea of function,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants